<?
/*********************************************
 *企业简介
 * *******************************************/
function smarty_function_qishi_resume_show($params, &$smarty)
{
	extract($params);
	global $db,$_CFG;
	$id = (NULL != $id) ? $id : 0;
	$listname = (NULL != $listname) ? $listname : 'resume'; //默认的section名称
	if (intval($id)!=$id) return false;
	$sql = "select * from ".table('resume')." WHERE id=".intval($id);
	$val=$db->getone($sql);
	if ($val){
		$resume_basic=get_resume_basic($val['uid']);//简历基本资料
		$resume_intention=get_resume_intention($val['uid']);//求职意向
		$resume_specialty=get_resume_specialty($val['uid']);//技能特长
		$resume_education=get_resume_education($val['uid']);//教育经历列表
		$resume_work=get_resume_work($val['uid']);//工作经历列表
		$resume_training=get_resume_training($val['uid']);//培训经历列表
		$resume_photo=get_resume_photo($val['uid']);//形象照片
		$area=get_jobs_area_one($val['area']);//所在地区
		$education=get_jobs_education_one($val['education']);//学历
		$experience=get_jobs_experience_one($val['experience']);//工作经验
		//基本信息
//		$val['sex']=$val['sex']=="1"?"男":"女";
		if ($val['sex']=="1") $val['sex']="先生";
		if ($val['sex']=="2") $val['sex']="太太";
		if ($val['sex']=="3") $val['sex']="女士";
		if ($val['sex']=="4") $val['sex']="小姐";
		$val['area']=$area['categoryname'];
		$val['education']=$education['categoryname'];
		$val['experience']=$experience['categoryname'];
		$val['householdaddress']=$resume_basic['householdaddress'];
		$val['refreshtime']=date("Y-m-d H:i:s",$val['refreshtime']);
		//基本信息-婚姻状况
		if ($val['marriage']=="1") $val['marriage']="未婚";
		if ($val['marriage']=="2") $val['marriage']="已婚";
		if ($val['marriage']=="3") $val['marriage']="離婚";
		if ($val['marriage']=="4") $val['marriage']="配偶離世";
		//求职意向
		$val['recentjobs']=$resume_intention['recentjobs'];
		$intention_nature=get_resume_intention_nature($val['uid']);//意向职位性质
		$intention_jobs=get_resume_intention_jobs($val['uid']);//意向职位性质
		$intention_area=get_resume_intention_area($val['uid']);//意向地区
		$intention_trade=get_resume_intention_trade($val['uid']);//意向行业
		$val['intention_wage']=$resume_intention['wage_name'];//期望工资待遇
		foreach ($intention_nature as $value)
		{
			$val['intention_nature'].=$value['jid_name']."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		}
		foreach ($intention_jobs as $jobs)
		{
			$val['intention_jobs'].=$jobs['subclass_name']."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		}
		foreach ($intention_area as $intention_area)
		{
			$val['intention_area'].=$intention_area['jid_name']."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		}
		foreach ($intention_trade as $intention_trade)
		{
			$val['intention_trade'].=$intention_trade['jid_name']."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		}
		//技能特长
//		$val['specialty']=$resume_specialty['specialty'];
		$val['specialty']=$resume_specialty;
		//教育经历
		$val['education_list']=get_resume_education($val['uid']);
		//工作经历
		$val['work_list']=get_resume_work($val['uid']);
		//培训经历
		$val['training_list']=get_resume_training($val['uid']);
		//照片
		if ($val['photo_display']=="1" && $val['photo_audit']=="1" )$val['photosrc']=$_CFG['resume_photo_dir_thumb'].$val['photo'];
		else $val['photosrc']=$_CFG['site_template']."images/no_photo.gif";
	}
	$smarty->assign($listname, $val);
	unset($val);
}
?>